You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blocking: the Phase 548 hit-test contract currently treats freehand primitives as filled rectangles.
GraphWhiteboardPrimitiveRendererAdapter.HitTest(...) sends every primitive through Contains(...), and Contains(...) only checks BoundsOrigin + BoundsSize. The freehand points projected into GraphWhiteboardPrimitiveSceneItem.Points are never used, so any click inside the freehand bounding box returns a hit even when it is far from the actual stroke. That would give future selection/edit/eraser paths false positives while the docs/tests claim topmost primitive hit-testing evidence for rectangle/freehand primitives.
Please either make HitTest kind-aware for freehand primitives, for example using segment-distance plus an explicit tolerance, and add a negative test for a point inside the freehand bounds but away from the stroke; or narrow the Phase 548 claim/tests so this slice does not present freehand hit-testing as proven.
Addressed the freehand hit-test blocker in 3dad5ae.
What changed:
Added regression coverage for a point inside the freehand bounds but away from the stroke returning no hit.
Added positive coverage for a point near a freehand stroke segment returning the primitive hit.
Updated GraphWhiteboardPrimitiveRendererAdapter to keep rectangle hit-testing bounds-based while freehand hit-testing uses bounds as a fast reject and then segment-distance tolerance against the projected points.
GitHub checks on PR Phase 548: whiteboard primitive renderer adapter skeleton #220 head 3dad5aecd9ed7f4191a0a20073a8f2bdd6d347b1 are all passing, including hygiene-proof, framework matrix, linux/macos validation, contract-proof, and release-validation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
avalonia-node-map-10pwhile leaving Phase 549/550 TBD.Test Plan
dotnet test tests\AsterGraph.Editor.Tests\AsterGraph.Editor.Tests.csproj -c Release --filter WhiteboardPrimitiveRendererAdapterContractsTests -v:minimaldotnet test tests\AsterGraph.Demo.Tests\AsterGraph.Demo.Tests.csproj -c Release --filter "FullyQualifiedName~ReactFlowParityRoadmapDocsTests" -v:minimaldotnet test tests\AsterGraph.Demo.Tests\AsterGraph.Demo.Tests.csproj -c Release -v:minimaldotnet build AsterGraph.sln -c Release -v:minimalgit diff --checkStack